test(deps): skip transient failures in github URL reachability test#344
Conversation
TestRegistryGithubBinaryURLsExist hits real GitHub release URLs to verify asset names. Transient 5xx responses and network errors were being reported as test failures, breaking CI on every GitHub blip (e.g. ripgrep arm64 502 on main, run 25020206997). Only fail on 404/410 (asset genuinely missing) and other 4xx (real config problems). Skip on 5xx and transport errors. Update the test comment to match actual behavior — it claimed to be opt-in via -urls, but only honored testing.Short.
|
Claude finished @dpup's task in 50s —— View job Code Review
Overall: LGTM. This is a clean, focused fix. The error classification is correct and the comment fix is accurate. What's good:
One thing worth considering: GitHub could return 429 Too Many Requests if the test hits rate limits on release asset URLs. The current Minor nit (not worth a change): The Neither of these blocks merging. |
Summary
TestRegistryGithubBinaryURLsExistHEADs every github-binary release URL in the registry to catch wrong asset names. Until now any non-2xx response was a hard failure — including transient 5xx blips from GitHub's CDN. That brokemainin run 25020206997 when ripgrep's arm64 asset returned a 502, and it'll keep doing so on every GitHub hiccup.This change keeps the validation but classifies the response:
Also fixes the comment on the test, which claimed it was opt-in via a
-urlsflag — it only ever honoredtesting.Short.Test plan
go vet ./internal/deps/...cleangolangci-lint run ./internal/deps/...cleango test -short ./internal/deps/...passes (skips the URL test)